{literal}
    <script>
        $(function(){
            // Datepicker
            $('#dateDepot').datepicker({
                dateFormat: 'dd/mm/yy'
            });
            $('#dateReprise').datepicker({
                dateFormat: 'dd/mm/yy'
            });
        });
    </script>
{/literal}

{* /////  UNE FOIS QUE LE FORMULAIRE A ETE POSTE \\\\\\ *} 
 
{if ($smarty.get.action=="modifier_vente" AND $smarty.get.type_client=="ecole" AND ($erreurs!="" OR $smarty.get.valid==""))}
    <center><h1>Veuillez saisir les informations concernant la vente: </h1></center>
    <p>
        <form action="index.php5">
        <input type="hidden" name="page" value="florient">
        <input type="hidden" name="action" value="modifier_vente">
        <input type="hidden" name="valid" value=true>
        <input type="hidden" name="type_client" value="ecole">
        <input type="hidden" name="id" value="{$smarty.get.id}">
        <table align=center>
            <tr>
                <td class="titreForm">Semaine de la vente :</td>
                <td>
                    <input type="text" name="semaine" value="{if $vente->semaine_vente!=""}{$vente->semaine_vente}{else}{$smarty.session.semaine_vente}{/if}">
                </td>
            </tr>
            <tr>
                <td class="titreForm">Date de d&eacute;p&ocirc;t :</td>
                <td>
                    <input type="text" name="date_depot" id="dateDepot" value="{if $vente->date_depot_vente!=""}{$vente->date_depot_vente|date_format:"%d/%m/%Y"}{else}{$smarty.session.date_depot|date_format:"%d/%m/%Y"}{/if}">
                </td>
            </tr>
            <tr>
                <td class="titreForm">Date de reprise :</td>
                <td>
                    <input type="text" name="date_reprise" id="dateReprise" value="{if $vente->date_reprise_vente!=""}{$vente->date_reprise_vente|date_format:"%d/%m/%Y"}{else}{$smarty.session.date_reprise|date_format:"%d/%m/%Y"}{/if}">
                </td>
            </tr>
            <tr>
                <td class="titreForm">Dotation vente :</td>
                <td><input type="text" name="dotation" value="{if $vente->dotation_vente!=""}{$vente->dotation_vente}{else}{$smarty.session.dotation}{/if}"></td>
            </tr>
            <tr>
                <td class="titreForm">Droit dotation :</td>
                <td><input type="text" name="droit_dotation" value="{if $vente->droit_dotation_vente!=""}{$vente->droit_dotation_vente}{else}{$smarty.session.droit_dotation}{/if}"></td>
            </tr>
            <tr>
                <td class="titreForm">Login</td>
                <td><input type="text" name="login" value="{if $vente->login_vente!=""}{$vente->login_vente}{else}{$smarty.session.login}{/if}"></td>
            </tr>
            <tr>
                <td class="titreForm">Pass</td>
                <td><input type="text" name="pass" value="{if $vente->pass_vente!=""}{$vente->pass_vente}{else}{$smarty.session.pass}{/if}"></td>
            </tr>           
        </table>
        <center><input type="submit" value="Modifier la vente"><br />
        </form>
        {if $smarty.get.valid==true}
            <div id="erreurs">
                {$erreurs}
            </div>
        {/if}
<br />
<center>
    <a href="index.php5?page=florient&action=gerer_ventes">Retour &agrave; la gestion des ventes</a><br />
    <a href="index.php5?page=florient">Retourner &agrave; l'espace d'administration</a> 
</center>
{/if}

{if ($smarty.get.action=="modifier_vente" AND $smarty.get.type_client=="ecole" AND ($erreurs=="" AND $smarty.get.valid!=""))}
<h1>La vente &agrave &eacute;t&eacute; modifi&eacute;e</h1>
<br />
<center>
    <a href="index.php5?page=florient&action=gerer_ventes">Retour &agrave; la gestion des ventes</a> <br />
    <a href="index.php5?page=florient">Retourner &agrave; l'espace d'administration</a>
</center>
{/if}